#pragma once

#include <QMap>
#include <QByteArray>
#include <QString>

#include "Object.h"


class ObjectFactory
{
public:
    ObjectFactory();

public:
    ObjectPtr GetObject(const QString& name, const QByteArray& value);

private:
    ObjectPtr ProduceNew(const QString& name, const QByteArray& value);

private:
    typedef QMap<QString, ObjectPtr> Objects;
    typedef QMap<QString, QByteArray> TypeMap;
    
    Objects _producedObjects;
    TypeMap _builtinTable;
};